import request from '@/utils/request'

//获取用户管理列表的接口
export const getUserList=(page,limit,searchObj)=>request({
 url:`/admin/acl/user/${page}/${limit}`,
 method:'get',
 params:searchObj
})

//添加用户的接口
export const addUser=(user)=>request({url:`/admin/acl/user/save`,method:'post',data:user});

//批量删除
export const deleteUser=(id)=>request({url:`/admin/acl/user/batchRemove`,method:'delete',data:id});

//获取某个用户的所有角色
export const reqgetRoles=(userId)=>request({url:`/admin/acl/user/toAssign/${userId}`,method:'get'});

//给某个用户分配角色的接口  post
export const assignRoles=(userId,roleId)=>request({url:`/admin/acl/user/doAssign`,method:'post',params:{userId,roleId}});

//修改用户的接口  put
export const Update=(user)=>request({url:`/admin/acl/user/update`,method:'put',data:user});

//删除某个用户的接口
export const removeById=(id)=>request({url:`/admin/acl/user/remove/${id}`,method:'delete'});